<?php

namespace App\Repository\Repositories;

use App\Repository\Models\AttributeValues;
use App\Repository\Repositories\Interfaces\AttributeValuesRepository;

/**
 * Class AttributeValuesRepositoryEloquent.
 *
 * @package namespace App\Repository\Repositories;
 */
class AttributeValuesRepositoryEloquent extends BaseRepository implements AttributeValuesRepository
{
    /**
     * 搜索
     * @var array
     */
    protected $fieldSearchable = [
        'value'=> 'like',
        'attribute_id',
        'attribute.name' => 'like',
        'id'=> 'in',
        'is_common',
        'shop_id',
    ];
    
    public $fieldSearchReplace = [
        'attr_name' => 'attribute.name',
    ];
    
    public $fieldFuzzySearch = [
        'attribute.name',
        'value',
    ];

    /**
     * Specify Model class name
     *
     * @return string
     */
    public function model()
    {
        return AttributeValues::class;
    }
}
